package immutableclass;

import immutableclass.ImmutableEchiquier.Case;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Map;

public class ImmutableJeuDechecs implements Serializable {

    private static final long serialVersionUID = -8521157071106452130L;
    private final static ArrayList<ImmutablePiece> Pieces = ImmutablePiece.nouveauJeuDePiece();
    private final static ArrayList<ImmutableEchiquier> Echiquier = ImmutableEchiquier.nouvelEchiquier();
    private final static Map<Case, ImmutablePiece> PositionInitiale = ImmutablePositionInitiale.getPositionInitiale();
    private static ImmutableJeuDechecs instance;

    public ArrayList<ImmutableEchiquier> getEchiquier() {
        return Echiquier;
    }

    public ArrayList<ImmutablePiece> getPieces() {
        return Pieces;
    }

    public Map<Case, ImmutablePiece> getPositionInitiale() {
        return PositionInitiale;
    }

    private ImmutableJeuDechecs() {
    }

    public static ImmutableJeuDechecs getInstance() {
        if (null == instance) {
            instance = new ImmutableJeuDechecs();
        }
        return instance;

    }
}
